﻿using Gateway.Common.Entity;

namespace Gateway.Domain.Entities;

/// <summary>
/// 试题语言种类以及示例配置
/// </summary>
public class QuestionLanguage : EntityBase
{
    /// <summary>
    /// 语言
    /// </summary>
    public string Language { get; set; }
    /// <summary>
    /// 试题标识
    /// </summary>
    public string QuestionId { get; set; }
    /// <summary>
    /// 示例代码的文件名称
    /// </summary>
    public string ExamplesFileName { get; set; }
    /// <summary>
    /// 执行代码的文件名称
    /// </summary>
    public string ExecFileName { get; set; }
    /// <summary>
    /// 示例代码
    /// </summary>
    public string Examples { get; set; }
    /// <summary>
    /// 扩展代码片段
    /// </summary>
    public List<QuestionExtensionCode> ExtensionCodes { get; set; }

    /// <summary>
    /// 依赖的公共库的代码标识集合，逗号分割
    /// </summary>
    public List<string> DependCodes { get; set; }
    /// <summary>
    /// 试题
    /// </summary>
    public Question Question { get;private set; }
    public QuestionLanguage()
    {

    }

    public QuestionLanguage(string language = default, string questionId = default, string examplesFileName = default, string execFileName = default, string examples = default, List<QuestionExtensionCode> extensionCodes = default,
        List<string> dependCodes=default)
    {
        Language = language;
        QuestionId = questionId;
        ExamplesFileName = examplesFileName;
        ExecFileName = execFileName;
        Examples = examples;
        ExtensionCodes = extensionCodes;
        DependCodes = dependCodes;
    }
}